home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_100 / 122_01 / memops < prev    next >
Text File  |  1984-03-05  |  4KB  |  124 lines

  1. MEMORY RELATED OPERATORS:
  2. copyright (C) 1983 by E. E. Bergmann
  3. definitions in alphabetical(ASCII) order
  4. :
  5. ::
  6. *********************************************************
  7. *                            *
  8. * PISTOL-Portably Implemented Stack Oriented Language    *
  9. *            Version 2.0            *
  10. * (C) 1983 by    Ernest E. Bergmann            *
  11. *        Physics, Building #16            *
  12. *        Lehigh Univerisity            *
  13. *        Bethlehem, Pa. 18015            *
  14. *                            *
  15. * Permission is hereby granted for all reproduction and *
  16. * distribution of this material provided this notice is *
  17. * included.                        *
  18. *                            *
  19. *********************************************************
  20. :
  21. ::
  22. 1+W!    ADDR -->
  23.     Increments the word in RAM at ADDR by one.
  24.  
  25. ?    ADDR -->
  26.     Prints the word value located in RAM at ADDR;
  27.     equivalent to:   W@  =
  28.  
  29. C!    stores in the string area addressed by the top of
  30.     stack the character whose ASCII value is next to
  31.     the top.
  32.  
  33. C@    fetches the ASCII value of the character in the
  34.     string area addressed by the top of stack.
  35.  
  36. COMPBUF    System constant that points to the compile buffer in
  37.     RAM.
  38.  
  39. EDITBUF    System constant that points in the strings area to the
  40.     start of the editbuffer.  It also is the upper limit of
  41.     the input linebuffer, see LINEBUF.
  42.  
  43. LINEBUF    System constant that points in the strings area to the
  44.     start of the input line buffer that is filled in the
  45.     process of compiling a line of PISTOL.  It is filled
  46.     by GETLINE.
  47.  
  48. OFF    sets location addressed by top of stack to FALSE.
  49.  
  50. ON    sets location addressed by top of stack to TRUE.
  51.  
  52. RAMMAX    System constant that points to the end of accessible
  53.     RAM.
  54.  
  55. RAMMIN    System constant that points to the start of accessible
  56.     RAM; the area between RAMMIN and USER contains system
  57.     constants that can be read from but not written to.
  58.  
  59. READ-PROTECT
  60.     Boolean system constant.  If it is true, then operators
  61.     that access memory for reading are checked for legal
  62.     ranges.  For example, addresses must be in the range,
  63.     [RAMMIN..RAMMAX] for W@ and [STRINGSMIN..STRINGSMAX]
  64.     for C@ .  If the address during a read is outside these
  65.     limits, an error "READ VIOLATION" is generated and the
  66.     program does an ABORT.
  67.  
  68. STRINGSMAX    System constant that points to the end of the
  69.     strings area.
  70.  
  71. STRINGSMIN    System constant that points to the start of the
  72.     strings area.
  73.  
  74. TRANS    converts the logical address to the "actual address".
  75.     It is equivalent to mutiplying by the wordsize, W , and
  76.     adding the offset, USER ; its definition is, in effect:
  77.     W * USER +
  78.  
  79. TRANS@    Equivalent to: TRANS W@
  80.  
  81. USER    System constant that points to near the bottom of RAM.
  82.     It points to the lowest system variable location and
  83.     marks the top of the area where the system constants
  84.     are in RAM; these constants can be read with W@, but
  85.     not changed by W!
  86.  
  87. USER+    equivalent to: USER + 
  88.  
  89. W    System constant that gives the word size in address
  90.     units; see, for example, W+ , below.
  91.  
  92. W!    Stores at the word location addressed by the top of
  93.     stack the value next to top.
  94.  
  95. W*    TOS --> W*TOS
  96.     Multiplies the top of stack by the wordsize, W ;
  97.     Equivalent to:  W *
  98.  
  99. W+    TOS --> W+TOS
  100.     Increments the top of stack by the wordsize of the
  101.     implementation; equivalent to:   W +
  102.  
  103. W+W!    ADDR -->
  104.     Increments the word in RAM at ADDR by the wordsize, W.
  105.  
  106. W<-    equivalent to " SWAP W! "
  107.  
  108. W@    Fetches the contents of the word location addressed
  109.     by the top of stack (used extensively with words
  110.     defined by VARIABLE).
  111.  
  112. WRITE-PROTECT
  113.     Boolean system constant.  If it is true, then operators
  114.     that access memory for writing are checked for legal
  115.     ranges.  For example, addresses must be in the range,
  116.     [USER..RAMMAX] for W! and [STRINGSMIN..STRINGSMAX]
  117.     for C! .  If the address during a write is outside
  118.     these limits, an error "WRITE VIOLATION" is generated
  119.     and the    program does an ABORT.
  120.  
  121. :
  122. ER + 
  123.  
  124. W    System constant t